<?php
	require_once 'header.html';
?>
<form action="" method="post" onsubmit="return chkLogin(this);">
	<div class="login">
			<div class="login_ele"><div id="msg" style="color:red; font-weight:bold;text-align:center;width:200px; margin:0px auto;"></div></div>
			<div class="login_ele">帐  号：<input type="text" name="username"  id="username" value="" class="login_ipt" autocomplete="off"/></div>
			<div class="login_ele">密  码：<input type="password" name="password" id="password"  value=""  class="login_ipt" autocomplete="off"/></div>
			<div class="login_ele">检  码：<input type="text"  title="请输入图片的文字" name="verify" id="verify" value=""  class="login_ipt" autocomplete="off"/></div>
			<div class="login_ele"><img src="../verify.php" align="absmiddle" border="0"><input style="float:right; margin-right:20px;" type="submit" name="submit" value="登 录"  /></div>
			
	</div>
</form>
<script>
//在iframe里面的登录页面将最外层的页面置为登录页面
//if(self!=top){top.location.href=self.location.href;}
function isEmail(strEmail)
{
	if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
	{
		return true;
	} else{
		return false;
	}
}
function chkLogin(frm)
{
	if(frm.username.value == '')
	{
		$('#msg').html('请输入帐号');
		frm.username.focus();
		return false;
	}
	else if(frm.password.value == '')
	{
		$('#msg').html('请输入密码');
		frm.password.focus();
		return false;
	}else if(frm.password.value.length < 6)
	{
		$('#msg').html('请输入6位以上的密码');
		frm.password.focus();
		return false;
	}else if(frm.verify.value.length < 4)
	{
		$('#msg').html('请输入验证码');
		frm.verify.focus();
		return false;
	}
	
	return true;
}
$(document).ready(function(){
  $("#username").focus();
});
</script>
<?php
	require_once 'footer.html';
?>
